<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>智慧停车场管理系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        console.log("Layout HTML script loaded!");
    </script>
    <style>
        body { background: #f8f9fa; }
        .sidebar { min-width: 200px; background: #343a40; color: #fff; min-height: 100vh; }
        .sidebar a { color: #fff; text-decoration: none; display: block; padding: 12px 20px; }
        .sidebar a.active, .sidebar a:hover { background: #495057; }
        .content { padding: 24px; }
    </style>
</head>
<body>
<div class="d-flex">
    <!-- 侧边栏 -->
    <div class="sidebar">
        <h4 class="p-3">智慧停车场系统</h4>
        <a href="/parking-lot" th:classappend="${activePage == 'lot'} ? 'active'">停车场管理</a>
        <a href="/parking-space" th:classappend="${activePage == 'space'} ? 'active'">车位管理</a>
        <a href="/vehicle" th:classappend="${activePage == 'vehicle'} ? 'active'">车辆管理</a>
        <a href="/parking-record" th:classappend="${activePage == 'record'} ? 'active'">停车记录</a>
        <a href="/user" th:classappend="${activePage == 'user'} ? 'active'">用户管理</a>
        <hr style="border-color:#495057;">
        <a href="/login">登录</a>
        <a href="/register">注册</a>
    </div>
    <!-- 主内容区 -->
    <div class="flex-grow-1 content">
        <div th:replace="~{${contentView} :: content}"></div>
    </div>
</div>
</body>
</html> 